
import jenkins.model.*;
import hudson.model.*;
/**
 * 清理全部的任务的构建记录
 * */

println "_______________start..._______________"
println "---job list---"
Jenkins.instance.getAllItems(Job.class).each {job ->
    println "${job.fullName}"
    job.getBuilds().each{
        Run run=it
        run.delete()
    }
}
println "_______________success!!!_______________"
